﻿CREATE Procedure [dbo].[GetStoneTypeWithPrice]
As
Begin
	select distinct 
		st.[StoneTypeId]
		,st.[Name]
		,st.[Description]
		,st.[ImagePath]
		,st.[IsActive]
		,st.[ModifiedDate]
		,st.[CreationDate]
		,isnull(dbo.GetMinPriceByStoneTypeId(st.[StoneTypeId]), 0) as MinPrice
		,isnull(dbo.GetMaxPriceByStoneTypeId(st.[StoneTypeId]), 0) as MaxPrice
	from dbo.StoneType as st
	left join dbo.Stone as s on st.[StoneTypeId]= s.[StoneTypeId]

End